Repository navigation
gopls/internal/server: don't linkify dotted text without a scheme - #697
ninadsutrave wants to merge 6 commits into
Conversation
findLinksInString added an https scheme to any URL candidate that lacked one, so text in strings and comments such as "p.name" or "example.com" was shown as a link. Only accept scheme-less candidates whose host is go.dev, golang.org, or a subdomain of either. URLs with an http or https scheme are unaffected. Scheme-less IP addresses such as 127.0.0.1:8080, which were linkified for golang/go#38285, are no longer linked. Fixes golang/go#70033
|
This PR (HEAD: b8c7da1) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/848708. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Alan Donovan: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
This PR (HEAD: b5a9d14) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/848708. Important tips:
|
|
Message from Ninad Sutrave: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Alan Donovan: Patch Set 2: Code-Review+2 Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2026-10-16T22:09:39Z","revision":"8e0f2b069b4222dda9ad593003d5c12d2d7f4cd0"} Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Alan Donovan: Patch Set 2: -Commit-Queue (Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_57259>) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 2: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 2: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Madeline Kalil: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Ninad Sutrave: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
This PR (HEAD: 27f7bbd) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/848708. Important tips:
|
|
Message from Ninad Sutrave: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Madeline Kalil: Patch Set 3: Code-Review+2 Commit-Queue+1 (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2026-11-16T15:39:19Z","revision":"7230efce5f9f7f0b67535733ac4ca23be24b3972"} Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Madeline Kalil: Patch Set 3: -Commit-Queue (Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_3771561>) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 3: This CL has failed the run. Reason: Failed Tryjobs:
To reproduce, try Additional links for debugging:
To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 3: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Madeline Kalil: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
This PR (HEAD: 279975b) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/848708. Important tips:
|
|
Message from Ninad Sutrave: Patch Set 4: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Madeline Kalil: Patch Set 4: Auto-Submit+1 Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Alan Donovan: Patch Set 4: Code-Review+2 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
# Conflicts: # gopls/internal/server/link.go
|
Message from Madeline Kalil: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
This PR (HEAD: 06b8c36) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/848708. Important tips:
|
|
Message from Ninad Sutrave: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Madeline Kalil: Patch Set 5: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
|
Message from Madeline Kalil: Patch Set 5: Auto-Submit+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/848708. |
Links in strings and comments were found with xurls.Relaxed, which
also matches text without a scheme, and findLinksInString then added
https to it. So text such as "p.name" was shown as a link.
Only link text without a scheme when its host ends in .com, .net,
.org or .dev, so "example.com/doc" and "go.dev" are still links but
"p.name" is not. Bare IP addresses such as 127.0.0.1:8080
(golang/go#38285) are no longer linked.
While here, skip import strings using ParentEdgeKind and find links
in string literals without collecting them first.
Fixes golang/go#70033